import { isJSON } from "@/utils/is";
import { ColumnOptionsType } from "@/utils/dict";

/**
 * @description hex颜色转rgb颜色
 * @param {String} str 颜色值字符串
 * @returns {String} 返回处理后的颜色值
 */
export function getColumnOptionsType(tableColumnOptions?: string): ColumnOptionsType {
  if (!tableColumnOptions) {
    return ColumnOptionsType.null;
  }
  if (isJSON(tableColumnOptions)) {
    return ColumnOptionsType.link_table;
  }
  return ColumnOptionsType.custom;
}
